package com.cs456.TeamBobcat;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;

public class TeamBobcat extends Activity implements OnClickListener {
	/** Called when the activity is first created. */
	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.main);
		Button aboutButton = (Button) findViewById(R.id.aboutButton);
		Button waiButton = (Button) findViewById(R.id.waiButton);
		Button wdoesButton = (Button) findViewById(R.id.wdoesButton);
		Button wdidButton = (Button) findViewById(R.id.wdidButton);
		Button historyButton = (Button) findViewById(R.id.historyButton);
		Button helpButton = (Button) findViewById(R.id.helpButton);

		aboutButton.setOnClickListener(this);
		waiButton.setOnClickListener(this);
		wdoesButton.setOnClickListener(this);
		wdidButton.setOnClickListener(this);
		historyButton.setOnClickListener(this);
		helpButton.setOnClickListener(this);

	}

	public void onClick(View view) {
		switch (view.getId()) {
		case R.id.aboutButton:
			Intent aboutIntent = new Intent(TeamBobcat.this, Teamprofile.class);
			TeamBobcat.this.startActivity(aboutIntent);
			break;
		case R.id.waiButton:
			Intent waiIntent = new Intent(TeamBobcat.this, WhereAmI.class);
			TeamBobcat.this.startActivity(waiIntent);
			break;
		case R.id.wdoesButton:
			Intent wdoesIntent = new Intent(TeamBobcat.this,
					WhatDoesThisSay.class);
			TeamBobcat.this.startActivity(wdoesIntent);
			break;
		case R.id.wdidButton:
			Intent wdidIntent = new Intent(TeamBobcat.this,
					WhatDidTheySay.class);
			TeamBobcat.this.startActivity(wdidIntent);
			break;
		case R.id.historyButton:
			Intent historyIntent = new Intent(TeamBobcat.this, History.class);
			TeamBobcat.this.startActivity(historyIntent);
			break;
		case R.id.helpButton:
			Intent helpIntent = new Intent(TeamBobcat.this, Help.class);
			TeamBobcat.this.startActivity(helpIntent);
			break;
		}
	}

	private final int GROUP_DEFAULT = 0;
	private final int MENU_CONFIG = 0;

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		menu.add(GROUP_DEFAULT, MENU_CONFIG, 0, "Settings");
		return super.onCreateOptionsMenu(menu);
	}

	@Override
	public boolean onOptionsItemSelected(MenuItem item) {
		switch(item.getItemId()){
		case MENU_CONFIG:
			Intent config = new Intent(TeamBobcat.this,
					Configuration.class);
			TeamBobcat.this.startActivity(config);
			break;
		}
		return super.onOptionsItemSelected(item);
	}
}